import request from '@/utils/request'

// 查询业务组件列表
export function listBusinessComponent(query) {
  return request({
    url: '/business/businessComponent/list',
    method: 'get',
    params: query
  })
}

// 查询业务组件详细
export function getBusinessComponent(id) {
  return request({
    url: '/business/businessComponent/' + id,
    method: 'get'
  })
}

// 新增业务组件
export function addBusinessComponent(data) {
  return request({
    url: '/business/businessComponent',
    method: 'post',
    data: data
  })
}

// 修改业务组件
export function updateBusinessComponent(data) {
  return request({
    url: '/business/businessComponent',
    method: 'put',
    data: data
  })
}

// 删除业务组件
export function delBusinessComponent(id) {
  return request({
    url: '/business/businessComponent/' + id,
    method: 'delete'
  })
}
// 新增提交业务组件复合信息（含功主信息，参数列表）
export function commitadd(data) {
  return request({
    url: '/business/businessComponent/commitadd',
    method: 'post',
    data: data
  })
}
// 更新提交业务组件功能点复合信息（含主信息，参数列表）
export function commitupdate(data) {
  return request({
    url: '/business/businessComponent/commitupdate',
    method: 'post',
    data: data
  })
}
// 新增草稿业务组件复合信息（含功主信息，参数列表）
export function draftadd(data) {
  return request({
    url: '/business/businessComponent/draftadd',
    method: 'post',
    data: data
  })
}
// 更新草稿业务组件复合信息（含主信息，参数列表）
export function draftupdate(data) {
  return request({
    url: '/business/businessComponent/draftupdate',
    method: 'post',
    data: data
  })
}
